<!DOCTYPE html>
<html itemscope itemtype="http://schema.org/QAPage">
<head>
    
    <title>java - how to write decompilers - Stack Overflow</title>
    <link rel="shortcut icon" href="//cdn.sstatic.net/stackoverflow/img/favicon.ico?v=038622610830">
    <link rel="apple-touch-icon image_src" href="//cdn.sstatic.net/stackoverflow/img/apple-touch-icon.png?v=41f6e13ade69">
    <link rel="search" type="application/opensearchdescription+xml" title="Stack Overflow" href="/opensearch.xml">
    <meta name="twitter:card" content="summary">
    <meta name="twitter:domain" content="stackoverflow.com"/>
    <meta property="og:type" content="website" />
    <meta property="og:image" itemprop="image primaryImageOfPage" content="http://cdn.sstatic.net/stackoverflow/img/apple-touch-icon@2.png?v=ea71a5211a91" />
    <meta name="twitter:title" property="og:title" itemprop="title name" content="how to write decompilers" />
    <meta name="twitter:description" property="og:description" itemprop="description" content="how to write a simple decompiler for Java language? what are the steps of it?i don&#39;t know how to start!
thanks.
" />
    <meta property="og:url" content="http://stackoverflow.com/questions/5160159/how-to-write-decompilers"/>
    <link rel="canonical" href="http://stackoverflow.com/questions/5160159/how-to-write-decompilers" />

    
    
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <script src="//cdn.sstatic.net/Js/stub.en.js?v=941f90da38c8"></script>
    <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/stackoverflow/all.css?v=f74d6be61bfb">
    
    <meta name="twitter:app:country" content="US" />
    <meta name="twitter:app:name:iphone" content="Stack Exchange iOS" />
    <meta name="twitter:app:id:iphone" content="871299723" />
    <meta name="twitter:app:url:iphone" content="se-zaphod://stackoverflow.com/questions/5160159/how-to-write-decompilers" />
    <meta name="twitter:app:name:ipad" content="Stack Exchange iOS" />
    <meta name="twitter:app:id:ipad" content="871299723" />
    <meta name="twitter:app:url:ipad" content="se-zaphod://stackoverflow.com/questions/5160159/how-to-write-decompilers" />
    <meta name="twitter:app:name:googleplay" content="Stack Exchange Android">
    <meta name="twitter:app:url:googleplay" content="http://stackoverflow.com/questions/5160159/how-to-write-decompilers">
    <meta name="twitter:app:id:googleplay" content="com.stackexchange.marvin">
    <script>
        
        StackExchange.ready(function () {
                
                StackExchange.using("snippets", function () {
                    StackExchange.snippets.initSnippetRenderer();
                });
                

            StackExchange.using("postValidation", function () {
                StackExchange.postValidation.initOnBlurAndSubmit($('#post-form'), 2, 'answer');
            });

            
            StackExchange.question.init({showAnswerHelp:true,totalCommentCount:10,shownCommentCount:5,highlightColor:'#F4A83D',backgroundColor:'#FFF',questionId:5160159});

            styleCode();

                StackExchange.realtime.subscribeToQuestion('1', '5160159');
            
                    });
    </script>


    <script>
        StackExchange.init({"locale":"en","stackAuthUrl":"https://stackauth.com","serverTime":1422325244,"networkMetaHostname":"meta.stackexchange.com","routeName":"Questions/Show","styleCode":true,"enableUserHovercards":true,"snippets":{"enabled":true,"domain":"stacksnippets.net"},"site":{"name":"Stack Overflow","description":"Q&A for professional and enthusiast programmers","isNoticesTabEnabled":true,"recaptchaPublicKey":"6LdchgIAAAAAAJwGpIzRQSOFaO0pU6s44Xt8aTwc","recaptchaAudioLang":"en","enableNewTagCreationWarning":true,"nonAsciiTags":true,"enableSocialMediaInSharePopup":true},"user":{"fkey":"82279cd54a0b66748ea25ad3a2e4845c","isAnonymous":true,"ab":{"search_improvements":{"v":"experiment_20","g":2}}}});
        StackExchange.using.setCacheBreakers({"js/prettify-full.en.js":"f68b2acbb493","js/moderator.en.js":"e28c737d71c2","js/full-anon.en.js":"0c48f03632c7","js/full.en.js":"caf12654a3ea","js/wmd.en.js":"e05814c1d03f","js/third-party/jquery.autocomplete.min.js":"e5f01e97f7c3","js/third-party/jquery.autocomplete.min.en.js":"","js/mobile.en.js":"1a12cb33590d","js/help.en.js":"b5f40fd81205","js/tageditor.en.js":"9c54855bf167","js/tageditornew.en.js":"ac88e09e74d2","js/inline-tag-editing.en.js":"48f13b102998","js/revisions.en.js":"6c7265ea9fa1","js/review.en.js":"7bb28aa854de","js/tagsuggestions.en.js":"b278f9a0b23b","js/post-validation.en.js":"462766632778","js/explore-qlist.en.js":"4e6f969d97ee","js/events.en.js":"fffa68d12c5d","js/keyboard-shortcuts.en.js":"143f06fd679d","js/external-editor.en.js":"a7dd834567a2","js/external-editor.en.js":"a7dd834567a2","js/snippet-javascript.en.js":"a19a48da3961","js/snippet-javascript-codemirror.en.js":"5ec2a6fec7c2"});
        StackExchange.using("gps", function() {
             StackExchange.gps.init(true);
        });
    </script>
    
        <script>
            StackExchange.ready(function () {
                $('#nav-tour').click(function () {
                    StackExchange.using("gps", function() {
                        StackExchange.gps.track("aboutpage.click", { aboutclick_location: "headermain" }, true);
                    });
                });
            });
        </script>
    
    
</head>
<body class="question-page new-topbar">
    <noscript><div id="noscript-padding"></div></noscript>
    <div id="notify-container"></div>
    <div id="overlay-header"></div>
    <div id="custom-header"></div>




<div class="topbar">
    <div class="topbar-wrapper">

        <div class="js-topbar-dialog-corral">

<div class="topbar-dialog siteSwitcher-dialog dno">
    <div class="header">
        <h3><a href="//stackoverflow.com">current community</a></h3>
    </div>
    <div class="modal-content current-site-container">
        <ul class="current-site">
                <li>
                        <div class="related-links">
            <a href="http://chat.stackoverflow.com" class="js-gps-track"     data-gps-track="site_switcher.click({ item_type:6 })"
>chat</a>
                    <a href="http://blog.stackoverflow.com" class="js-gps-track"     data-gps-track="site_switcher.click({ item_type:7 })"
>blog</a>
            </div>




    <a href="//stackoverflow.com"
       class="current-site-link site-link js-gps-track"
       data-id="1"
       data-gps-track="
        site_switcher.click({ item_type:3 })">
        <div class="site-icon favicon favicon-stackoverflow" title="Stack Overflow"></div>
        Stack Overflow
    </a>

                </li>
                <li class="related-site">
                        <div class="L-shaped-icon-container">
        <span class="L-shaped-icon"></span>
    </div>

                    



    <a href="http://meta.stackoverflow.com"
       class="site-link js-gps-track"
       data-id="552"
       data-gps-track="
            site.switch({ target_site:552, item_type:3 }),
        site_switcher.click({ item_type:4 })">
        <div class="site-icon favicon favicon-stackoverflowmeta" title="Meta Stack Overflow"></div>
        Meta Stack Overflow
    </a>

                </li>
                            <li class="related-site">
                        <div class="L-shaped-icon-container">
        <span class="L-shaped-icon"></span>
    </div>

                    <a class="site-link js-gps-track"
                       href="//careers.stackoverflow.com?utm_source=stackoverflow.com&utm_medium=site-ui&utm_campaign=multicollider"
                            data-gps-track="site_switcher.click({ item_type:9 })"
>
                        <div class="site-icon favicon favicon-careers" title="Stack Overflow Careers"></div>
                        Stack Overflow Careers
                    </a>
                </li>
        </ul>
    </div>
    
    <div class="header" id="your-communities-header">
        <h3>
your communities        </h3>
            
    </div>
    <div class="modal-content" id="your-communities-section">
            
            <div class="call-to-login">
<a href="https://stackoverflow.com/users/signup?returnurl=http%3a%2f%2fstackoverflow.com%2fquestions%2f5160159%2fhow-to-write-decompilers" class="login-link js-gps-track"     data-gps-track="site_switcher.click({ item_type:10 })"
>Sign up</a> or <a href="https://stackoverflow.com/users/login?returnurl=http%3a%2f%2fstackoverflow.com%2fquestions%2f5160159%2fhow-to-write-decompilers" class="login-link js-gps-track"     data-gps-track="site_switcher.click({ item_type:11 })"
>log in</a> to customize your list.
            </div>
    </div>
    
    <div class="header">
        <h3><a href="//stackexchange.com/sites">more stack exchange communities</a></h3>
    </div>
    <div class="modal-content">
            <div class="child-content"></div>
    </div>
</div>
        </div>

        <div class="network-items">

            <a href="//stackexchange.com"
               class="topbar-icon icon-site-switcher yes-hover js-site-switcher-button js-gps-track"
               data-gps-track="site_switcher.show"
               title="A list of all 134 Stack Exchange sites">
                <span class="hidden-text">Stack Exchange</span>
            </a>

        </div>

        <div class="topbar-links">

                <div class="links-container">
                    <span class="topbar-menu-links">
                            <a href="https://stackoverflow.com/users/signup?returnurl=http%3a%2f%2fstackoverflow.com%2fquestions%2f5160159%2fhow-to-write-decompilers" class="login-link">sign up</a>
                            <a href="https://stackoverflow.com/users/login?returnurl=http%3a%2f%2fstackoverflow.com%2fquestions%2f5160159%2fhow-to-write-decompilers" class="login-link">log in</a>
                            <a href="/tour">tour</a>

                            <a href="#" class="icon-help js-help-button" title="Help Center and other resources">
        help
        <span class="triangle"></span>
    </a>
    <div class="topbar-dialog help-dialog js-help-dialog dno">
        <div class="modal-content">
            <ul>
                                    <li>
                        <a href="/tour" class="js-gps-track" data-gps-track="help_popup.click({ item_type:1 })">
                            Tour
                            <span class="item-summary">
                                Start here for a quick overview of the site
                            </span>
                        </a>
                    </li>
                <li>
                    <a href="/help" class="js-gps-track" data-gps-track="help_popup.click({ item_type:4 })">
                        Help Center
                        <span class="item-summary">
                            Detailed answers to any questions you might have
                        </span>
                    </a>
                </li>
                    <li>
                        <a href="//meta.stackoverflow.com" class="js-gps-track" data-gps-track="help_popup.click({ item_type:2 })">
                            Meta
                            <span class="item-summary">
                                Discuss the workings and policies of this site
                            </span>
                        </a>
                    </li>
            </ul>
        </div>
    </div>

                            <a href="//careers.stackoverflow.com?utm_source=stackoverflow.com&utm_medium=site-ui&utm_campaign=anon-topbar">stack overflow careers</a>
                    </span>
                </div>

            <div class="search-container">
                <form id="search" action="/search" method="get" autocomplete="off">
                    <input name="q" type="text" placeholder="search" value="" tabindex="1" autocomplete="off" maxlength="240" />
                </form>
            </div>

        </div>
    </div>
</div>
    <script>
        StackExchange.ready(function() { StackExchange.topbar.init(); });
    </script>

    <div class="container">
        <div id="header">
            <br class="cbt">
            <div id="hlogo">
                <a href="/">
                    Stack Overflow
                </a>
            </div>
            <div id="hmenus">
                <div class="nav mainnavs">
                    <ul>
                        <li class="youarehere"><a id="nav-questions" href="/questions">Questions</a></li>
                        <li><a id="nav-tags" href="/tags">Tags</a></li>
                        <li><a id="nav-users" href="/users">Users</a></li>
                        <li><a id="nav-badges" href="/help/badges">Badges</a></li>
                        <li><a id="nav-unanswered" href="/unanswered">Unanswered</a></li>
                    </ul>
                </div>
                <div class="nav askquestion">
                    <ul>
                        <li>
                            <a id="nav-askquestion"  href="/questions/ask">Ask Question</a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        



        <div id="content" class="snippet-hidden">
            

<div itemscope itemtype="http://schema.org/Question">
	<link itemprop="image" href="//cdn.sstatic.net/stackoverflow/img/apple-touch-icon.png">
			<!--googleoff: all-->

<div id="herobox-mini">
    <div id="hero-content">
        <span id="controls">
            <a href="/tour" id="tell-me-more" class="button">Take the 2-minute tour</a>
            <span id="close"><a title="click to dismiss">&times;</a></span>
        </span>
        <div id="blurb">
            Stack Overflow is a question and answer site for professional and enthusiast programmers. It&#39;s 100% free, no registration required.
        </div>        
    </div>
    <script>
        $('#tell-me-more').click(function () {
            var clickSource = $("body").attr("class") + '-mini';
            if ($("body").hasClass("questions-page")) {
                clickSource = 'questionpagemini';
            } else if ($("body").hasClass("question-page")) {
                clickSource = 'questionpagemini';
            } else if ($("body").hasClass("home-page")) {
                clickSource = 'homepagemini';
            }

            StackExchange.using("gps", function () {
                StackExchange.gps.track("aboutpage.click", { aboutclick_location: clickSource } , true);
            });
        });
        $('#herobox-mini #close').click(function () {
            StackExchange.using("gps", function () {
                StackExchange.gps.track("hero.action", { hero_action_type: "close" }, true);
            });
            $.cookie("hero", "none", { path: "/", expires: 365 });
            var $hero = $("#herobox-mini");
            $hero.slideUp('fast', function () { $hero.remove(); });
            return false;
        });
    </script>
</div>
			<!--googleon: all-->
			<div id="question-header">
			<h1 itemprop="name"><a href="/questions/5160159/how-to-write-decompilers" class="question-hyperlink">how to write decompilers [closed]</a></h1>
		</div>
			<div id="mainbar">

			

<div class="question" data-questionid="5160159"  id="question">

    <script>
                var ados = ados || {};ados.run = ados.run || [];
                ados.run.push(function() { ados_add_placement(22,8277,"adzerk704511333",4).setZone(43) ; });                    
            </script>
            <div class="everyonelovesstackoverflow" id="adzerk704511333">
            </div>    <table>
        <tr>
            <td class="votecell">
                

<div class="vote">
    <input type="hidden" name="_id_" value="5160159">
    <a class="vote-up-off" title="This question shows research effort; it is useful and clear">up vote</a>
    <span itemprop="upvoteCount" class="vote-count-post ">5</span>
    <a class="vote-down-off" title="This question does not show any research effort; it is unclear or not useful">down vote</a>
    
    <a class="star-off" href="#" title="This is a favorite question (click again to undo)">favorite</a>
    <div class="favoritecount"><b>2</b></div>   

</div>

            </td>
            
<td class="postcell">
<div>
    <div class="post-text" itemprop="text">

        <p>how to write a simple decompiler for Java language? what are the steps of it?i don't know how to start!
thanks.</p>

    </div>
    <div class="post-taglist">
        <a href="/questions/tagged/java" class="post-tag" title="show questions tagged 'java'" rel="tag">java</a> <a href="/questions/tagged/decompiler" class="post-tag" title="show questions tagged 'decompiler'" rel="tag">decompiler</a> 
    </div>
    <table class="fw">
    <tr>
    <td class="vt">
<div class="post-menu"><a href="/q/5160159" title="short permalink to this question" class="short-link" id="link-post-5160159">share</a><span class="lsep">|</span><a href="/posts/5160159/edit" class="suggest-edit-post" title="">improve this question</a></div>        
    </td>
    <td align="right" class="post-signature">
<div class="user-info ">
    <div class="user-action-time">
        <a href="/posts/5160159/revisions" title="show all edits to this post">edited <span title="2011-03-01 21:38:51Z" class="relativetime">Mar 1 '11 at 21:38</span></a>
    </div>
    <div class="user-gravatar32">
        <a href="/users/21234/skaffman"><div class="gravatar-wrapper-32"><img src="http://i.stack.imgur.com/Drui0.jpg?s=32&g=1" alt="" width="32" height="32"></div></a>
    </div>
    <div class="user-details">
        <a href="/users/21234/skaffman">skaffman</a><br>
        <span class="reputation-score" title="reputation score 213913" dir="ltr">214k</span><span title="41 gold badges"><span class="badge1"></span><span class="badgecount">41</span></span><span title="472 silver badges"><span class="badge2"></span><span class="badgecount">472</span></span><span title="558 bronze badges"><span class="badge3"></span><span class="badgecount">558</span></span>
    </div>
</div>    </td>
    <td class="post-signature owner">
        <div class="user-info ">
    <div class="user-action-time">
        asked <span title="2011-03-01 20:48:02Z" class="relativetime">Mar 1 '11 at 20:48</span>
    </div>
    <div class="user-gravatar32">
        <a href="/users/640074/siavash90"><div class="gravatar-wrapper-32"><img src="https://www.gravatar.com/avatar/c720d0c9214b7e3aef2a1ee5683a4ead?s=32&d=identicon&r=PG" alt="" width="32" height="32"></div></a>
    </div>
    <div class="user-details">
        <a href="/users/640074/siavash90">siavash90</a><br>
        <span class="reputation-score" title="reputation score " dir="ltr">44</span><span title="1 silver badge"><span class="badge2"></span><span class="badgecount">1</span></span><span title="4 bronze badges"><span class="badge3"></span><span class="badgecount">4</span></span>
    </div>
</div>
    </td>
    </tr>
    </table>
</div>
</td>
        </tr>
                    <tr>
            <td class="special-status" colspan="2">
                <div class="question-status">
        <h2>                    <b>closed</b> as not a real question by <a href="/users/237838/andrew-barber">Andrew Barber</a><span class="mod-flair" title="moderator">♦</span> <span dir="ltr"><span title="2013-03-25 08:45:03Z" class="relativetime">Mar 25 '13 at 8:45</span></span>
</h2>
        <p>It&#39;s difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and   cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened,   <a href="http://stackoverflow.com/help/reopen-questions">visit the help center</a>.<span class="close-status-suffix">If this question can be reworded to fit the rules in the <a href="/help/closed-questions">help center</a>, please <a href="/posts/5160159/edit">edit the question</a>.</span></p>
    </div>
            </td>
        </tr>
    
<tr>
    <td class="votecell"></td>
    <td>
	    <div id="comments-5160159" class="comments ">
		    <table>
                <tbody data-remaining-comments-count="5"
                       data-canpost="false"
                       data-cansee="true"
                       data-comments-unavailable="false"
                       data-addlink-disabled="true">



    <tr id="comment-5794479" class="comment ">
        <td class="comment-actions">
            <table>
                <tbody>
                    <tr>
                        <td class=" comment-score">
                                <span title="number of &#39;useful comment&#39; votes received"
                                      class="warm">14</span>
                        </td>
                        <td>
                                &nbsp;
                        </td>
                    </tr>
                </tbody>
            </table>
        </td>
        <td class="comment-text">
            <div style="display: block;" class="comment-body">
                <span class="comment-copy">Write a Java compiler first. Then reverse the process.</span>
                &ndash;&nbsp;
                    <a href="/users/39106/filip-ekberg"
                       title="23086 reputation"
                       class="comment-user">Filip Ekberg</a>
                <span class="comment-date" dir="ltr"><span title="2011-03-01 20:51:18Z" class="relativetime-clean">Mar 1 '11 at 20:51</span></span>
                                                                            </div>
                    </td>
    </tr>
    <tr id="comment-5794518" class="comment ">
        <td class="comment-actions">
            <table>
                <tbody>
                    <tr>
                        <td class=" comment-score">
                                <span title="number of &#39;useful comment&#39; votes received"
                                      class="cool">1</span>
                        </td>
                        <td>
                                &nbsp;
                        </td>
                    </tr>
                </tbody>
            </table>
        </td>
        <td class="comment-text">
            <div style="display: block;" class="comment-body">
                <span class="comment-copy">learn the instruction set of the thing you want to decompile, and learn it well...</span>
                &ndash;&nbsp;
                    <a href="/users/53897/thorbj%c3%b8rn-ravn-andersen"
                       title="41274 reputation"
                       class="comment-user">Thorbj&#248;rn Ravn Andersen</a>
                <span class="comment-date" dir="ltr"><span title="2011-03-01 20:54:00Z" class="relativetime-clean">Mar 1 '11 at 20:54</span></span>
                                                                            </div>
                    </td>
    </tr>
    <tr id="comment-5794530" class="comment ">
        <td class="comment-actions">
            <table>
                <tbody>
                    <tr>
                        <td class=" comment-score">
                                <span title="number of &#39;useful comment&#39; votes received"
                                      class="cool">3</span>
                        </td>
                        <td>
                                &nbsp;
                        </td>
                    </tr>
                </tbody>
            </table>
        </td>
        <td class="comment-text">
            <div style="display: block;" class="comment-body">
                <span class="comment-copy">+1 for re-opening. Maybe the wording of the question is not the best one, but I believe it&#39;s still a valid question - &#39;how are decompilers constructed?&#39;, &#39;how to write a simple decompiler for xyz language?&#39;, &#39;what are the steps of decompilation process?&#39; - pick your choice, re-open and edit.</span>
                &ndash;&nbsp;
                    <a href="/users/118587/grzegorz-oledzki"
                       title="11125 reputation"
                       class="comment-user">Grzegorz Oledzki</a>
                <span class="comment-date" dir="ltr"><span title="2011-03-01 20:54:31Z" class="relativetime-clean">Mar 1 '11 at 20:54</span></span>
                    <span class="edited-yes" title="this comment was edited 1 time"></span>
                                                                            </div>
                    </td>
    </tr>
    <tr id="comment-5794555" class="comment ">
        <td class="comment-actions">
            <table>
                <tbody>
                    <tr>
                        <td class=" comment-score">
                                <span title="number of &#39;useful comment&#39; votes received"
                                      class="cool">1</span>
                        </td>
                        <td>
                                &nbsp;
                        </td>
                    </tr>
                </tbody>
            </table>
        </td>
        <td class="comment-text">
            <div style="display: block;" class="comment-body">
                <span class="comment-copy">@Grezgorz, We first need to know what the OP wants.</span>
                &ndash;&nbsp;
                    <a href="/users/39106/filip-ekberg"
                       title="23086 reputation"
                       class="comment-user">Filip Ekberg</a>
                <span class="comment-date" dir="ltr"><span title="2011-03-01 20:56:05Z" class="relativetime-clean">Mar 1 '11 at 20:56</span></span>
                                                                            </div>
                    </td>
    </tr>
    <tr id="comment-5794667" class="comment ">
        <td class="comment-actions">
            <table>
                <tbody>
                    <tr>
                        <td class=" comment-score">
                                <span title="number of &#39;useful comment&#39; votes received"
                                      class="cool">2</span>
                        </td>
                        <td>
                                &nbsp;
                        </td>
                    </tr>
                </tbody>
            </table>
        </td>
        <td class="comment-text">
            <div style="display: block;" class="comment-body">
                <span class="comment-copy">@Filip, hmm. For unknown reasons (homework, fun, learning, whatever) the OP wants to write a decompiler of an existing language. Probably the language has already been chosen, but not revealed. Seriously I don&#39;t see what&#39;s the problem here.</span>
                &ndash;&nbsp;
                    <a href="/users/118587/grzegorz-oledzki"
                       title="11125 reputation"
                       class="comment-user">Grzegorz Oledzki</a>
                <span class="comment-date" dir="ltr"><span title="2011-03-01 21:04:09Z" class="relativetime-clean">Mar 1 '11 at 21:04</span></span>
                                                                            </div>
                    </td>
    </tr>
                </tbody>
		    </table>
	    </div>
            <div id="comments-link-5160159" data-rep=50 data-anon=true>

                <a class="js-add-link comments-link  dno"
                   title="Use comments to ask for more information or suggest improvements. Avoid answering questions in comments."
                   ></a><span class="js-link-separator dno">&nbsp;|&nbsp;</span><a class="js-show-link comments-link " title="expand to show all comments on this post, or add one of your own" href=# onclick="">show <b>5</b> more comments</a>
            </div>
    </td>
</tr>        </table>
</div>

			<div id="answers">

				<a name="tab-top"></a>
				<div id="answers-header">
					<div class="subheader answers-subheader">
						<h2>
								3 Answers
                                <span style="display:none;" itemprop="answerCount">3</span>
						</h2>
						<div>
							<div id="tabs">
        <a href="/questions/5160159/how-to-write-decompilers?answertab=active#tab-top" title="Answers with the latest activity first">active</a>
        <a href="/questions/5160159/how-to-write-decompilers?answertab=oldest#tab-top" title="Answers in the order they were provided">oldest</a>
        <a class="youarehere" href="/questions/5160159/how-to-write-decompilers?answertab=votes#tab-top" title="Answers with the highest score first">votes</a>
</div>
						</div>
					</div>    
				</div>    




  
<a name="5160714"></a>
<div id="answer-5160714" class="answer" data-answerid="5160714"  itemscope itemtype="http://schema.org/Answer">
    <table>
        <tr>
            <td class="votecell">
                

<div class="vote">
    <input type="hidden" name="_id_" value="5160714">
    <a class="vote-up-off" title="This answer is useful">up vote</a>
    <span itemprop="upvoteCount" class="vote-count-post ">11</span>
    <a class="vote-down-off" title="This answer is not useful">down vote</a>
    


</div>

            </td>
            


<td class="answercell">
    <div class="post-text" itemprop="text">
<p>From <a href="http://jameshamilton.eu/sites/default/files/JavaBytecodeDecompilerSurveyExtended.pdf">An Empirical Evaluation of Java Bytecode Decompiler Eectiveness (PDF)</a> by James Hamilton.</p>

<blockquote>
  <p>The problems to be solved by a general decompiler [Emmerik(2007)] can be divided into different categories :</p>
  
  <ol>
  <li>separation of code from data</li>
  <li>separation of pointers from constants</li>
  <li>separation of original and oset pointers</li>
  <li>declaration of data</li>
  <li>recovery of parameters and returns</li>
  <li>analysis of indirect jumps and calls</li>
  <li><strong>type analysis</strong></li>
  <li><strong>merging of instructions</strong></li>
  <li><strong>structure of loops and conditionals</strong></li>
  </ol>
  
  <p>The decompilation of machine code requires all 9 of these tasks to be solved whereas
  the decompilation of Java bytecode requires only 3 of these tasks to be solved due to
  the amount of information stored in a class file. A fourth problem caused by exceptions
  and synchronisation stems from their implementation using arbitrary control 
  flow and possibly overlapping exception handlers.</p>
  
  <p>Decompiling Java bytecode requires analysis of most local variable types, merging
  of stack-based instructions and structuring of loops and conditionals. Java bytecode
  retains type information for fields, method returns and parameters but it does not
  contain type information for local variables. This information encoded in the class file
  makes the task of type inference easier compared to decompilation of machine code.</p>
</blockquote>

<p><sub>* steps relevant to Java, emphasis mine.</sub></p>

<p>The paper gives a good overview of the technical problems you'll need to deal with, as well as a good rundown of currently available tools.</p>

<p>Depending on how robust you want to be, you want to test against the output of as many compilers and obfuscators as possible. Becoming familiar with obfuscators and optimizers (like <a href="http://proguard.sourceforge.net/">Proguard</a>) and their techniques will only help you.</p>

<p><strong>Resources</strong></p>

<p>Get familiar with the <a href="http://java.sun.com/docs/books/jvms/">Java Virtual Machine Specification</a>, as you'll be referring to it a lot.</p>

<p>There are also various books on decompiling java, including <a href="http://rads.stackoverflow.com/amzn/click/1590592654">Decompiling Java</a> and <a href="http://rads.stackoverflow.com/amzn/click/0672326388">Covert Java</a></p>

<p><strong>Examples</strong></p>

<p><a href="http://jode.sourceforge.net/">JODE</a> is an older open source decompiler (which still gets very high marks in its evaluations) which you can learn a lot from.</p>
    </div>
    <table class="fw">
    <tr>
    <td class="vt">
<div class="post-menu"><a href="/a/5160714" title="short permalink to this answer" class="short-link" id="link-post-5160714">share</a><span class="lsep">|</span><a href="/posts/5160714/edit" class="suggest-edit-post" title="">improve this answer</a></div>                    </td>
    <td align="right" class="post-signature">
<div class="user-info ">
    <div class="user-action-time">
        <a href="/posts/5160714/revisions" title="show all edits to this post">edited <span title="2011-03-01 22:17:09Z" class="relativetime">Mar 1 '11 at 22:17</span></a>
    </div>
    <div class="user-gravatar32">
        
    </div>
    <div class="user-details">
        <br>
        
    </div>
</div>    </td>
            


    <td align="right" class="post-signature">   
       

    <div class="user-info user-hover">
    <div class="user-action-time">
        answered <span title="2011-03-01 21:41:33Z" class="relativetime">Mar 1 '11 at 21:41</span>
    </div>
    <div class="user-gravatar32">
        <a href="/users/80714/chadwick"><div class="gravatar-wrapper-32"><img src="https://www.gravatar.com/avatar/bd24c5b58cc29f2f9cc2db3c0d3d4a89?s=32&d=identicon&r=PG" alt="" width="32" height="32"></div></a>
    </div>
    <div class="user-details">
        <a href="/users/80714/chadwick">Chadwick</a><br>
        <span class="reputation-score" title="reputation score " dir="ltr">6,869</span><span title="4 gold badges"><span class="badge1"></span><span class="badgecount">4</span></span><span title="29 silver badges"><span class="badge2"></span><span class="badgecount">29</span></span><span title="56 bronze badges"><span class="badge3"></span><span class="badgecount">56</span></span>
    </div>
</div>
    </td>
    </tr>
    </table>
</td>
        </tr>
        
<tr>
    <td class="votecell"></td>
    <td>
	    <div id="comments-5160714" class="comments  dno">
		    <table>
                <tbody data-remaining-comments-count="0"
                       data-canpost="false"
                       data-cansee="true"
                       data-comments-unavailable="false"
                       data-addlink-disabled="true">

                        <tr><td></td><td></td></tr>
                </tbody>
		    </table>
	    </div>
            <div id="comments-link-5160714" data-rep=50 data-anon=true>

                <a class="js-add-link comments-link disabled-link "
                   title="Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”."
                   >add a comment</a><span class="js-link-separator dno">&nbsp;|&nbsp;</span><a class="js-show-link comments-link dno" title="expand to show all comments on this post, or add one of your own" href=# onclick=""></a>
            </div>
    </td>
</tr>    </table>
</div>
<script>
                var ados = ados || {};ados.run = ados.run || [];
                ados.run.push(function() { ados_add_placement(22,8277,"adzerk2093264116",4).setZone(44) ; });                    
            </script>
            <div class="everyonelovesstackoverflow" id="adzerk2093264116">
            </div>
  
<a name="5160734"></a>
<div id="answer-5160734" class="answer" data-answerid="5160734"  itemscope itemtype="http://schema.org/Answer">
    <table>
        <tr>
            <td class="votecell">
                

<div class="vote">
    <input type="hidden" name="_id_" value="5160734">
    <a class="vote-up-off" title="This answer is useful">up vote</a>
    <span itemprop="upvoteCount" class="vote-count-post ">2</span>
    <a class="vote-down-off" title="This answer is not useful">down vote</a>
    


</div>

            </td>
            


<td class="answercell">
    <div class="post-text" itemprop="text">
<p>Disclaimer: I haven't tried to write a decompiler, but this is what my thoughts would be if I was given such a task...</p>

<p>First of all, one needs to understand what a decompiler is. As already suggested in some comments, a decompiler is something opposite to a compiler. Namely it takes a compiled executable and transforms it back to the source code in some programming language. Further reading: <a href="http://en.wikipedia.org/wiki/Decompiler" rel="nofollow">Wikipedia about Decompilers</a>.</p>

<p>If you focus on writing a decompiler for Java language, then you probably already know how does the compiled code of Java programming language typically look like. That is, it's been built on a concept of byte code. In short words, a bytecode is an artificial assembly-like language which is portable (i.e. isn't necessarily tailored to suite a particular hardware platform). In Java the compiled code is stored as <code>.class</code> files. More reading: <a href="http://en.wikipedia.org/wiki/Bytecode" rel="nofollow">Wikipedia about Bytecode</a>, <a href="http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html" rel="nofollow">Sun documentation on <code>.class</code> file format</a>.</p>

<p>Before you start it's important to realize that not only is the task of writing a decompiler an extremely complicated one (like every other program of this scale), but one has to cope with limitations or restrictions implied by the compilation process. Don't forget the compilation process (the one takes the source code and turns it into runnable bytecode) loses and transforms some information. So one cannot expect it to be possible to create a decompiler which would give the original source code. The output of a decompiler will most likely be less human-readable </p>

<p>Then, as suggested in some other comment, you would like to basically reverse most of the typical steps of a compiler (which is a different story). For compilers there are tons of materials available everywhere (see <a href="http://stackoverflow.com/questions/1669/learning-to-write-a-compiler">Learning to write a compiler</a>). For decompilers there's not that much, but still I believe you may find some articles - as suggested in other answers.</p>
    </div>
    <table class="fw">
    <tr>
    <td class="vt">
<div class="post-menu"><a href="/a/5160734" title="short permalink to this answer" class="short-link" id="link-post-5160734">share</a><span class="lsep">|</span><a href="/posts/5160734/edit" class="suggest-edit-post" title="">improve this answer</a></div>                    </td>
            


    <td align="right" class="post-signature">   
       

    <div class="user-info user-hover">
    <div class="user-action-time">
        answered <span title="2011-03-01 21:43:32Z" class="relativetime">Mar 1 '11 at 21:43</span>
    </div>
    <div class="user-gravatar32">
        <a href="/users/118587/grzegorz-oledzki"><div class="gravatar-wrapper-32"><img src="https://www.gravatar.com/avatar/8d5f94f9183aadaf92fb191f77e3f827?s=32&d=identicon&r=PG" alt="" width="32" height="32"></div></a>
    </div>
    <div class="user-details">
        <a href="/users/118587/grzegorz-oledzki">Grzegorz Oledzki</a><br>
        <span class="reputation-score" title="reputation score 11125" dir="ltr">11.1k</span><span title="5 gold badges"><span class="badge1"></span><span class="badgecount">5</span></span><span title="30 silver badges"><span class="badge2"></span><span class="badgecount">30</span></span><span title="61 bronze badges"><span class="badge3"></span><span class="badgecount">61</span></span>
    </div>
</div>
    </td>
    </tr>
    </table>
</td>
        </tr>
        
<tr>
    <td class="votecell"></td>
    <td>
	    <div id="comments-5160734" class="comments  dno">
		    <table>
                <tbody data-remaining-comments-count="0"
                       data-canpost="false"
                       data-cansee="true"
                       data-comments-unavailable="false"
                       data-addlink-disabled="true">

                        <tr><td></td><td></td></tr>
                </tbody>
		    </table>
	    </div>
            <div id="comments-link-5160734" data-rep=50 data-anon=true>

                <a class="js-add-link comments-link disabled-link "
                   title="Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”."
                   >add a comment</a><span class="js-link-separator dno">&nbsp;|&nbsp;</span><a class="js-show-link comments-link dno" title="expand to show all comments on this post, or add one of your own" href=# onclick=""></a>
            </div>
    </td>
</tr>    </table>
</div>

  
<a name="5160677"></a>
<div id="answer-5160677" class="answer" data-answerid="5160677"  itemscope itemtype="http://schema.org/Answer">
    <table>
        <tr>
            <td class="votecell">
                

<div class="vote">
    <input type="hidden" name="_id_" value="5160677">
    <a class="vote-up-off" title="This answer is useful">up vote</a>
    <span itemprop="upvoteCount" class="vote-count-post ">1</span>
    <a class="vote-down-off" title="This answer is not useful">down vote</a>
    


</div>

            </td>
            


<td class="answercell">
    <div class="post-text" itemprop="text">
<p>First you will need to learn Java bytecode. The <a href="http://download.forge.objectweb.org/asm/asm-guide.pdf" rel="nofollow">documentation</a> (PDF) of <a href="http://asm.ow2.org/" rel="nofollow">ASM</a> is a good source for that. <a href="http://java.sun.com/docs/books/jvms/second_edition/html/VMSpecTOC.doc.html" rel="nofollow">The Java Virtual Machine Specification</a> and a JVM opcode reference will also be useful (I found <a href="http://homepages.inf.ed.ac.uk/kwxm/JVM/home.html" rel="nofollow">this one</a> - do you know other better opcode references?).</p>

<p>Then you can begin exploring that what kind of bytecode the Java compiler produces for different constructs in Java source files. After you know that, you might have a chance of reversing the process. (ASM or BCEL can be used to read and manipulate the bytecode, though that's the least one of your worries.)</p>
    </div>
    <table class="fw">
    <tr>
    <td class="vt">
<div class="post-menu"><a href="/a/5160677" title="short permalink to this answer" class="short-link" id="link-post-5160677">share</a><span class="lsep">|</span><a href="/posts/5160677/edit" class="suggest-edit-post" title="">improve this answer</a></div>                    </td>
    <td align="right" class="post-signature">
<div class="user-info ">
    <div class="user-action-time">
        <a href="/posts/5160677/revisions" title="show all edits to this post">edited <span title="2011-03-01 21:43:43Z" class="relativetime">Mar 1 '11 at 21:43</span></a>
    </div>
    <div class="user-gravatar32">
        
    </div>
    <div class="user-details">
        <br>
        
    </div>
</div>    </td>
            


    <td align="right" class="post-signature">   
       

    <div class="user-info user-hover">
    <div class="user-action-time">
        answered <span title="2011-03-01 21:37:59Z" class="relativetime">Mar 1 '11 at 21:37</span>
    </div>
    <div class="user-gravatar32">
        <a href="/users/62130/esko-luontola"><div class="gravatar-wrapper-32"><img src="https://www.gravatar.com/avatar/520c9c078b8d25980de17b8d4fe0ceba?s=32&d=identicon&r=PG" alt="" width="32" height="32"></div></a>
    </div>
    <div class="user-details">
        <a href="/users/62130/esko-luontola">Esko Luontola</a><br>
        <span class="reputation-score" title="reputation score 55497" dir="ltr">55.5k</span><span title="5 gold badges"><span class="badge1"></span><span class="badgecount">5</span></span><span title="66 silver badges"><span class="badge2"></span><span class="badgecount">66</span></span><span title="90 bronze badges"><span class="badge3"></span><span class="badgecount">90</span></span>
    </div>
</div>
    </td>
    </tr>
    </table>
</td>
        </tr>
        
<tr>
    <td class="votecell"></td>
    <td>
	    <div id="comments-5160677" class="comments  dno">
		    <table>
                <tbody data-remaining-comments-count="0"
                       data-canpost="false"
                       data-cansee="true"
                       data-comments-unavailable="false"
                       data-addlink-disabled="true">

                        <tr><td></td><td></td></tr>
                </tbody>
		    </table>
	    </div>
            <div id="comments-link-5160677" data-rep=50 data-anon=true>

                <a class="js-add-link comments-link disabled-link "
                   title="Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”."
                   >add a comment</a><span class="js-link-separator dno">&nbsp;|&nbsp;</span><a class="js-show-link comments-link dno" title="expand to show all comments on this post, or add one of your own" href=# onclick=""></a>
            </div>
    </td>
</tr>    </table>
</div>
				


						<h2 class="bottom-notice" data-loc="1">
Not the answer you&#39;re looking for?							Browse other questions tagged <a href="/questions/tagged/java" class="post-tag" title="show questions tagged 'java'" rel="tag">java</a> <a href="/questions/tagged/decompiler" class="post-tag" title="show questions tagged 'decompiler'" rel="tag">decompiler</a>  or <a href="/questions/ask">ask your own question</a>.						</h2>
			</div>
		</div>
				<div id="sidebar" class="show-votes">
						    <div class="module question-stats">
			        <table id="qinfo">
			            <tr>
			                <td>
			                    <p class="label-key">asked</p>
			                </td>
			                <td style="padding-left: 10px">
			                    <p class="label-key" title="2011-03-01 20:48:02Z"><b>3 years ago</b></p>
			                </td>
			            </tr>
			            <tr>
			                <td>
			                    <p class="label-key">viewed</p>
			                </td>

			                <td style="padding-left: 10px">
			                    <p class="label-key">
			                        <b>2124 times</b>
			                    </p>
			                </td>
			            </tr>
			                <tr>
			                    <td>
			                        <p class="label-key">active</p>
			                    </td>
			                    <td style="padding-left: 10px">
			                        <p class="label-key"><b><a href="?lastactivity" class="lastactivity-link" title="2013-03-25 02:31:37Z">1 year ago</a></b></p>
			                    </td>
			                </tr>
			        </table>
			    </div>
						
			<script>
                var ados = ados || {};ados.run = ados.run || [];
                ados.run.push(function() { ados_add_placement(22,8277,"adzerk236149221",[17,2221]).setZone(45) ; });                    
            </script>
            <div class="everyonelovesstackoverflow" id="adzerk236149221">
            </div>  
        <div id="hireme">
            <script>
;(function(e){var a=window.$,p=window.StackExchange,f=100,c="div#hireme,div.hireme",g=decodeURIComponent,i=encodeURIComponent,r=setTimeout,h=document,q,b,m={},l=location.hash;if(l.length>1){l.substr(1).split("&").forEach(function(t){var u=t.split("=");this[g(u[0])]=g(u[1])},m)}b=m.ac||m.accountid||(p&&p.options&&p.options.user&&p.options.user.accountId);if(b){m.ac=b}if(!m.tags){q=a(".post-taglist .post-tag").map(function(){return a(this).text()});if(q.length>0){m.tags=Array.prototype.join.call(q,";")}}if(l==="#large"){m.l=1}if(l==="#abort"){m.abort=1}function j(t){return a(t).html().replace(/\s+/g,"").length>0}function s(){var t=a("#sidebar [id^='adzerk'].everyonelovesstackoverflow");if(t.length===0){return true}return !j(t)}function n(){var t=a(c);if(t.length>0){if(m.l||a("#careersadsdoublehigh").length>0){m.l=1}var v=t.map(function(z,y){return"d="+y.id}).get().join("&");var x=["l","ip","ac","eng","prov","tags"];var u=Object.keys(m).filter(function(y){return x.indexOf(y)!==-1}).map(function(y){return i(y)+"="+i(m[y])}).join("&");if(u){v+="&"+u}var w=h.createElement("script");w.type="text/javascript";w.src=e+(e.indexOf("?")===-1?"?":"&")+v;h.body.appendChild(w)}}function o(){if(s()){d=r(o,f);return}if(m.abort){k()}n()}function k(){clearTimeout(d);a(c).each(function(){var t=a(this);if(!j(t)){var v=t;var u=t.parents(".everyonelovesstackoverflow").first();if(u.length>0){v=u}v.remove()}})}r(k,2000);var d=r(o,f)}).apply(null, ["//clc.stackoverflow.com/j/p"]);            </script>
            
        </div>
			<div style="margin-bottom: 10px;">
        

<style type="text/css">
#newsletter-ad {
    width: 190px;
    height: 250px;
    overflow: hidden;
    background: url('//cdn.sstatic.net/stackoverflow/img/newsletter-ad.png');
    padding: 0 15px 0 15px;
}
#newsletter-ad-header {
    margin-top: 60px;
}
#newsletter-ad ul {
    margin: 1em 0 1em 1.5em;
}
#newsletter-ad ul li {
    margin-bottom: 5px;
}
#newsletter-signup-container {
    text-align: center;
}
#newsletter-preview-container {
    margin-top: 10px;
    text-align: center;
}
#newsletter-email-input {
    width: 200px;
}
</style>

<script>
    StackExchange.ready(function () {
        StackExchange.newsletterAd.init();
    });
</script>

<div id="newsletter-ad">
    <p id="newsletter-ad-header">Get the <b>weekly newsletter!</b></p>
    <ul>
        <li>Top questions and answers</li>
        <li>Important announcements</li>
        <li>Unanswered questions</li>
    </ul>
    <div id="newsletter-signup-container"><input id="newsletter-signup" type="button" value="Sign up for the newsletter" /></div>
    <p id="newsletter-preview-container">see an <a href="http://stackexchange.com/newsletters/newsletter?site=stackoverflow.com" id="newsletter-preview">example newsletter</a></p>
    <div class="dno">
        
<p class="privacy-policy-agreement">
By subscribing, you agree to the <a href='http://stackexchange.com/legal/privacy-policy' target='_blank'>privacy policy</a> and <a href='http://stackexchange.com/legal/terms-of-service' target='_blank'>terms of service</a>.</p>
<input type="hidden" name="legalLinksShown" value="1" />
    </div>
</div>

    </div>  
    
            <div class="module sidebar-linked">
	<h4 id="h-linked">Linked</h4>
	<div class="linked" data-tracker="lq=1">
<div class="spacer">
	<a href="/q/1669" title="Vote score (upvotes - downvotes)">
		<div class="answer-votes answered-accepted large">704</div>
	</a>
	<a href="/questions/1669/learning-to-write-a-compiler" class="question-hyperlink">Learning to write a compiler</a>
</div><div class="spacer">
	<a href="/q/15609440" title="Vote score (upvotes - downvotes)">
		<div class="answer-votes answered-accepted default">3</div>
	</a>
	<a href="/questions/15609440/decompile-c-code-with-debug-info" class="question-hyperlink">Decompile C code with debug info?</a>
</div>			</div>
</div>

				<div class="module sidebar-related">
					<h4 id="h-related">Related</h4>
                    <div class="related js-gps-related-questions" data-tracker="rq=1">
                        <div class="spacer">
<a href="/q/272535" title="Vote score (upvotes - downvotes)">
    <div class="answer-votes answered-accepted large">346
    </div>
</a><a href="/questions/272535/how-do-i-decompile-java-class-files" class="question-hyperlink">How do I &ldquo;decompile&rdquo; Java class files?</a>
</div>
<div class="spacer">
<a href="/q/1249973" title="Vote score (upvotes - downvotes)">
    <div class="answer-votes answered-accepted large">365
    </div>
</a><a href="/questions/1249973/decompiling-dex-into-java-sourcecode" class="question-hyperlink">decompiling DEX into Java sourcecode</a>
</div>
<div class="spacer">
<a href="/q/3898391" title="Vote score (upvotes - downvotes)">
    <div class="answer-votes answered-accepted default">34
    </div>
</a><a href="/questions/3898391/choose-and-test-java-decompiler" class="question-hyperlink">Choose and test java decompiler</a>
</div>
<div class="spacer">
<a href="/q/4547740" title="Vote score (upvotes - downvotes)">
    <div class="answer-votes default">1
    </div>
</a><a href="/questions/4547740/how-to-decompile-obfuscated-java-programs-avoiding-class-package-name-collisions" class="question-hyperlink">How to decompile obfuscated java programs avoiding class/package name collisions</a>
</div>
<div class="spacer">
<a href="/q/9632927" title="Vote score (upvotes - downvotes)">
    <div class="answer-votes default">1
    </div>
</a><a href="/questions/9632927/java-decompiler-how-work" class="question-hyperlink">Java decompiler. How work?</a>
</div>
<div class="spacer">
<a href="/q/9893024" title="Vote score (upvotes - downvotes)">
    <div class="answer-votes answered-accepted default">-1
    </div>
</a><a href="/questions/9893024/java-decompilers" class="question-hyperlink">java decompilers</a>
</div>
<div class="spacer">
<a href="/q/10582279" title="Vote score (upvotes - downvotes)">
    <div class="answer-votes answered-accepted default">3
    </div>
</a><a href="/questions/10582279/how-to-prevent-my-class-to-be-decompiled" class="question-hyperlink">How to prevent my class to be decompiled</a>
</div>
<div class="spacer">
<a href="/q/11287513" title="Vote score (upvotes - downvotes)">
    <div class="answer-votes answered-accepted default">2
    </div>
</a><a href="/questions/11287513/how-to-dynamically-decompile-a-class-object-on-memory" class="question-hyperlink">How to dynamically decompile a Class Object on memory?</a>
</div>
<div class="spacer">
<a href="/q/23217891" title="Vote score (upvotes - downvotes)">
    <div class="answer-votes answered-accepted default">1
    </div>
</a><a href="/questions/23217891/decompile-a-class-file-programmatically" class="question-hyperlink">decompile a .class file programmatically</a>
</div>
<div class="spacer">
<a href="/q/27160506" title="Vote score (upvotes - downvotes)">
    <div class="answer-votes answered-accepted default">2
    </div>
</a><a href="/questions/27160506/decompiler-how-to-structure-loops" class="question-hyperlink">Decompiler - how to structure loops</a>
</div>

                    </div>
				</div>
            
<div id="hot-network-questions" class="module">
    <h4>
        <a href="//stackexchange.com/questions?tab=hot" 
           class="js-gps-track" 
           data-gps-track="posts_hot_network.click({ item_type:1, location:11 })">
            Hot Network Questions
        </a>
    </h4>
    <ul>
            <li >
                <div class="favicon favicon-gamedev" title="Game Development Stack Exchange"></div><a href="http://gamedev.stackexchange.com/questions/92845/why-do-tutorials-use-different-approaches-to-opengl-rendering" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:53 }); posts_hot_network.click({ item_type:2, location:11 })">
                    Why do tutorials use different approaches to OpenGL rendering?
                </a>

            </li>
            <li >
                <div class="favicon favicon-electronics" title="Electrical Engineering Stack Exchange"></div><a href="http://electronics.stackexchange.com/questions/150975/how-to-reduce-28-v-to-24-v-under-load" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:135 }); posts_hot_network.click({ item_type:2, location:11 })">
                    How to reduce 28 V to 24 V under load?
                </a>

            </li>
            <li >
                <div class="favicon favicon-codegolf" title="Programming Puzzles &amp; Code Golf Stack Exchange"></div><a href="http://codegolf.stackexchange.com/questions/44983/how-many-ways-to-write-n-as-a-product-of-m-integers" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:200 }); posts_hot_network.click({ item_type:2, location:11 })">
                    How many ways to write N as a product of M integers?
                </a>

            </li>
            <li >
                <div class="favicon favicon-codereview" title="Code Review Stack Exchange"></div><a href="http://codereview.stackexchange.com/questions/78649/meta-programming-template-for-collection-statistics" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:196 }); posts_hot_network.click({ item_type:2, location:11 })">
                    Meta-programming template for collection statistics
                </a>

            </li>
            <li >
                <div class="favicon favicon-stackoverflow" title="Stack Overflow"></div><a href="http://stackoverflow.com/questions/28139259/why-do-we-need-monads" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:1 }); posts_hot_network.click({ item_type:2, location:11 })">
                    Why do we need monads?
                </a>

            </li>
            <li class="dno js-hidden">
                <div class="favicon favicon-parenting" title="Parenting Stack Exchange"></div><a href="http://parenting.stackexchange.com/questions/18401/how-do-i-handle-a-10-year-old-girl-in-love" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:228 }); posts_hot_network.click({ item_type:2, location:11 })">
                    How do I handle a 10 year old girl &quot;in love&quot;?
                </a>

            </li>
            <li class="dno js-hidden">
                <div class="favicon favicon-electronics" title="Electrical Engineering Stack Exchange"></div><a href="http://electronics.stackexchange.com/questions/150949/why-gcc-compiler-omitting-some-code" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:135 }); posts_hot_network.click({ item_type:2, location:11 })">
                    Why GCC compiler omitting some code?
                </a>

            </li>
            <li class="dno js-hidden">
                <div class="favicon favicon-physics" title="Physics Stack Exchange"></div><a href="http://physics.stackexchange.com/questions/161406/why-doesnt-fluorescent-lamp-produce-shadows" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:151 }); posts_hot_network.click({ item_type:2, location:11 })">
                    Why doesn&#39;t fluorescent lamp produce shadows?
                </a>

            </li>
            <li class="dno js-hidden">
                <div class="favicon favicon-serverfault" title="Server Fault"></div><a href="http://serverfault.com/questions/662501/how-can-i-determine-the-power-demand-of-an-hp-servers-power-supply-under-load" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:2 }); posts_hot_network.click({ item_type:2, location:11 })">
                    How can I determine the power demand of an HP server&#39;s power supply under load?
                </a>

            </li>
            <li class="dno js-hidden">
                <div class="favicon favicon-academia" title="Academia Stack Exchange"></div><a href="http://academia.stackexchange.com/questions/37606/non-academic-positions-after-phd" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:415 }); posts_hot_network.click({ item_type:2, location:11 })">
                    Non-academic positions after PhD
                </a>

            </li>
            <li class="dno js-hidden">
                <div class="favicon favicon-biology" title="Biology Stack Exchange"></div><a href="http://biology.stackexchange.com/questions/28066/is-there-an-organism-which-has-a-common-english-name-which-overlaps-with-another" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:375 }); posts_hot_network.click({ item_type:2, location:11 })">
                    Is there an organism which has a common English name which overlaps with another organism&#39;s scientific name (or vice versa?)
                </a>

            </li>
            <li class="dno js-hidden">
                <div class="favicon favicon-unix" title="Unix &amp; Linux Stack Exchange"></div><a href="http://unix.stackexchange.com/questions/181001/how-can-i-kill-a-process-and-be-sure-the-pid-hasnt-been-reused" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:106 }); posts_hot_network.click({ item_type:2, location:11 })">
                    How can I kill a process and be sure the PID hasn&#39;t been reused
                </a>

            </li>
            <li class="dno js-hidden">
                <div class="favicon favicon-stackoverflow" title="Stack Overflow"></div><a href="http://stackoverflow.com/questions/28158861/what-is-stdref-useful-for-in-this-function" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:1 }); posts_hot_network.click({ item_type:2, location:11 })">
                    What is std::ref useful for in this function?
                </a>

            </li>
            <li class="dno js-hidden">
                <div class="favicon favicon-stackoverflow" title="Stack Overflow"></div><a href="http://stackoverflow.com/questions/28154400/stdthread-taking-lambda-with-ref-arg-fails-to-compile" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:1 }); posts_hot_network.click({ item_type:2, location:11 })">
                    std::thread taking lambda with ref arg fails to compile
                </a>

            </li>
            <li class="dno js-hidden">
                <div class="favicon favicon-drupal" title="Drupal Answers"></div><a href="http://drupal.stackexchange.com/questions/145451/how-can-i-find-a-module-or-activity-that-is-excessively-writing-to-the-database" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:220 }); posts_hot_network.click({ item_type:2, location:11 })">
                    How can I find a module or activity that is excessively writing to the database?
                </a>

            </li>
            <li class="dno js-hidden">
                <div class="favicon favicon-math" title="Mathematics Stack Exchange"></div><a href="http://math.stackexchange.com/questions/1121013/how-can-one-know-every-cauchy-sequence-in-a-complete-metric-space-converges" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:69 }); posts_hot_network.click({ item_type:2, location:11 })">
                    How can one know every Cauchy sequence in a complete metric space converges?
                </a>

            </li>
            <li class="dno js-hidden">
                <div class="favicon favicon-rpg" title="Role-playing Games Stack Exchange"></div><a href="http://rpg.stackexchange.com/questions/55899/can-i-use-a-spell-with-a-casting-time-of-bonus-action-as-my-action" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:122 }); posts_hot_network.click({ item_type:2, location:11 })">
                    Can I use a spell with a casting time of &quot;Bonus Action&quot; as my action?
                </a>

            </li>
            <li class="dno js-hidden">
                <div class="favicon favicon-ell" title="English Language Learners Stack Exchange"></div><a href="http://ell.stackexchange.com/questions/47935/concise-phrase-to-describe-a-weekend-spent-in-a-countryside-holiday-home" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:481 }); posts_hot_network.click({ item_type:2, location:11 })">
                    Concise phrase to describe a weekend spent in a countryside holiday home
                </a>

            </li>
            <li class="dno js-hidden">
                <div class="favicon favicon-physics" title="Physics Stack Exchange"></div><a href="http://physics.stackexchange.com/questions/161611/what-is-a-reasonably-accurate-but-simple-model-of-the-milky-ways-gravitational" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:151 }); posts_hot_network.click({ item_type:2, location:11 })">
                    What is a reasonably accurate but simple model of the Milky Way&#39;s gravitational field?
                </a>

            </li>
            <li class="dno js-hidden">
                <div class="favicon favicon-english" title="English Language &amp; Usage Stack Exchange"></div><a href="http://english.stackexchange.com/questions/223788/are-there-rules-to-determine-whether-a-musicians-title-will-end-with-er-or" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:97 }); posts_hot_network.click({ item_type:2, location:11 })">
                    Are there rules to determine whether a musician&#39;s title will end with “-er” or “-ist”?
                </a>

            </li>
            <li class="dno js-hidden">
                <div class="favicon favicon-tex" title="TeX - LaTeX Stack Exchange"></div><a href="http://tex.stackexchange.com/questions/225040/pagestyle-uheadings-no-page-number-on-first-page-with-chapter-title" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:85 }); posts_hot_network.click({ item_type:2, location:11 })">
                    Pagestyle uheadings. No page number on first page with chapter title
                </a>

            </li>
            <li class="dno js-hidden">
                <div class="favicon favicon-serverfault" title="Server Fault"></div><a href="http://serverfault.com/questions/662548/disallowing-http-methods-on-tomcat-is-case-sensitive" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:2 }); posts_hot_network.click({ item_type:2, location:11 })">
                    Disallowing HTTP methods on Tomcat is case sensitive?
                </a>

            </li>
            <li class="dno js-hidden">
                <div class="favicon favicon-codereview" title="Code Review Stack Exchange"></div><a href="http://codereview.stackexchange.com/questions/78652/calculating-epoch-seconds" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:196 }); posts_hot_network.click({ item_type:2, location:11 })">
                    Calculating epoch seconds
                </a>

            </li>
            <li class="dno js-hidden">
                <div class="favicon favicon-ell" title="English Language Learners Stack Exchange"></div><a href="http://ell.stackexchange.com/questions/47925/living-by-himself-vs-living-on-his-own" class="js-gps-track" data-gps-track="site.switch({ item_type:11, target_site:481 }); posts_hot_network.click({ item_type:2, location:11 })">
                    Living by himself vs Living on his own
                </a>

            </li>
    </ul>

        <a href="#" 
           class="show-more js-show-more js-gps-track" 
           data-gps-track="posts_hot_network.click({ item_type:3, location:11 })">
            more hot questions
        </a>
</div>
		</div>
		<script>
StackExchange.ready(function(){$.get('/posts/5160159/ivc/590a');});
</script>
<noscript>
    <div><img src="/posts/5160159/ivc/590a" class="dno" alt="" width="0" height="0"></div>
</noscript><div style="display:none" id="prettify-lang">lang-java</div></div>



        </div>
    </div>
    <div id="footer" class="categories">
        <div class="footerwrap">
            <div id="footer-menu">
                <div class="top-footer-links">
                        <a href="/tour">tour</a>
                    <a href="/help">help</a>
                    <a href="http://blog.stackoverflow.com?blb=1">blog</a>
                        <a href="http://chat.stackoverflow.com">chat</a>
                    <a href="http://data.stackexchange.com">data</a>
                    <a href="http://stackexchange.com/legal">legal</a>
                    <a href="http://stackexchange.com/legal/privacy-policy">privacy policy</a>
                    <a href="http://stackexchange.com/work-here">work here</a>
                    <a href="http://stackexchange.com/mediakit">advertising info</a>

                    <a onclick='StackExchange.switchMobile("on")'>mobile</a>
                    <b><a href="/contact">contact us</a></b>
                        <b><a href="http://meta.stackoverflow.com">feedback</a></b>
                    
                </div>
                <div id="footer-sites">
                    <table>
    <tr>
            <th colspan=3>
                Technology
            </th>
            <th >
                Life / Arts
            </th>
            <th >
                Culture / Recreation
            </th>
            <th >
                Science
            </th>
            <th >
                Other
            </th>
    </tr>
    <tr>
            <td>
                <ol>
                        <li><a href="//stackoverflow.com" title="professional and enthusiast programmers">Stack Overflow</a></li>
                        <li><a href="//serverfault.com" title="system and network administrators">Server Fault</a></li>
                        <li><a href="//superuser.com" title="computer enthusiasts and power users">Super User</a></li>
                        <li><a href="//webapps.stackexchange.com" title="power users of web applications">Web Applications</a></li>
                        <li><a href="//askubuntu.com" title="Ubuntu users and developers">Ask Ubuntu</a></li>
                        <li><a href="//webmasters.stackexchange.com" title="pro webmasters">Webmasters</a></li>
                        <li><a href="//gamedev.stackexchange.com" title="professional and independent game developers">Game Development</a></li>
                        <li><a href="//tex.stackexchange.com" title="users of TeX, LaTeX, ConTeXt, and related typesetting systems">TeX - LaTeX</a></li>
                            </ol></td><td><ol>
                        <li><a href="//programmers.stackexchange.com" title="professional programmers interested in conceptual questions about software development">Programmers</a></li>
                        <li><a href="//unix.stackexchange.com" title="users of Linux, FreeBSD and other Un*x-like operating systems.">Unix &amp; Linux</a></li>
                        <li><a href="//apple.stackexchange.com" title="power users of Apple hardware and software">Ask Different (Apple)</a></li>
                        <li><a href="//wordpress.stackexchange.com" title="WordPress developers and administrators">WordPress Development</a></li>
                        <li><a href="//gis.stackexchange.com" title="cartographers, geographers and GIS professionals">Geographic Information Systems</a></li>
                        <li><a href="//electronics.stackexchange.com" title="electronics and electrical engineering professionals, students, and enthusiasts">Electrical Engineering</a></li>
                        <li><a href="//android.stackexchange.com" title="enthusiasts and power users of the Android operating system">Android Enthusiasts</a></li>
                        <li><a href="//security.stackexchange.com" title="Information security professionals">Information Security</a></li>
                            </ol></td><td><ol>
                        <li><a href="//dba.stackexchange.com" title="database professionals who wish to improve their database skills and learn from others in the community">Database Administrators</a></li>
                        <li><a href="//drupal.stackexchange.com" title="Drupal developers and administrators">Drupal Answers</a></li>
                        <li><a href="//sharepoint.stackexchange.com" title="SharePoint enthusiasts">SharePoint</a></li>
                        <li><a href="//ux.stackexchange.com" title="user experience researchers and experts">User Experience</a></li>
                        <li><a href="//mathematica.stackexchange.com" title="users of Mathematica">Mathematica</a></li>
                        <li><a href="//salesforce.stackexchange.com" title="Salesforce administrators, implementation experts, developers and anybody in-between">Salesforce</a></li>
                    
                        <li>
                            <a href="http://stackexchange.com/sites#technology" class="more">
                                more (14)
                            </a>
                        </li>
                </ol>
            </td>
            <td>
                <ol>
                        <li><a href="//photo.stackexchange.com" title="professional, enthusiast and amateur photographers">Photography</a></li>
                        <li><a href="//scifi.stackexchange.com" title="science fiction and fantasy enthusiasts">Science Fiction &amp; Fantasy</a></li>
                        <li><a href="//graphicdesign.stackexchange.com" title="Graphic Design professionals, students, and enthusiasts">Graphic Design</a></li>
                        <li><a href="//cooking.stackexchange.com" title="professional and amateur chefs">Seasoned Advice (cooking)</a></li>
                        <li><a href="//diy.stackexchange.com" title="contractors and serious DIYers">Home Improvement</a></li>
                        <li><a href="//money.stackexchange.com" title="people who want to be financially literate">Personal Finance &amp; Money</a></li>
                        <li><a href="//academia.stackexchange.com" title="academics and those enrolled in higher education">Academia</a></li>
                    
                        <li>
                            <a href="http://stackexchange.com/sites#lifearts" class="more">
                                more (10)
                            </a>
                        </li>
                </ol>
            </td>
            <td>
                <ol>
                        <li><a href="//english.stackexchange.com" title="linguists, etymologists, and serious English language enthusiasts">English Language &amp; Usage</a></li>
                        <li><a href="//skeptics.stackexchange.com" title="scientific skepticism">Skeptics</a></li>
                        <li><a href="//judaism.stackexchange.com" title="those who base their lives on Jewish law and tradition and anyone interested in learning more">Mi Yodeya (Judaism)</a></li>
                        <li><a href="//travel.stackexchange.com" title="road warriors and seasoned travelers">Travel</a></li>
                        <li><a href="//christianity.stackexchange.com" title="committed Christians, experts in Christianity and those interested in learning more">Christianity</a></li>
                        <li><a href="//gaming.stackexchange.com" title="passionate videogamers on all platforms">Arqade (gaming)</a></li>
                        <li><a href="//bicycles.stackexchange.com" title="people who build and repair bicycles, people who train cycling, or commute on bicycles">Bicycles</a></li>
                        <li><a href="//rpg.stackexchange.com" title="gamemasters and players of tabletop, paper-and-pencil role-playing games">Role-playing Games</a></li>
                    
                        <li>
                            <a href="http://stackexchange.com/sites#culturerecreation" class="more">
                                more (21)
                            </a>
                        </li>
                </ol>
            </td>
            <td>
                <ol>
                        <li><a href="//math.stackexchange.com" title="people studying math at any level and professionals in related fields">Mathematics</a></li>
                        <li><a href="//stats.stackexchange.com" title="people interested in statistics, machine learning, data analysis, data mining, and data visualization">Cross Validated (stats)</a></li>
                        <li><a href="//cstheory.stackexchange.com" title="theoretical computer scientists and researchers in related fields">Theoretical Computer Science</a></li>
                        <li><a href="//physics.stackexchange.com" title="active researchers, academics and students of physics">Physics</a></li>
                        <li><a href="//mathoverflow.net" title="professional mathematicians">MathOverflow</a></li>
                    
                        <li>
                            <a href="http://stackexchange.com/sites#science" class="more">
                                more (7)
                            </a>
                        </li>
                </ol>
            </td>
            <td>
                <ol>
                        <li><a href="//stackapps.com" title="apps, scripts, and development with the Stack Exchange API">Stack Apps</a></li>
                        <li><a href="//meta.stackexchange.com" title="meta-discussion of the Stack Exchange family of Q&amp;A websites">Meta Stack Exchange</a></li>
                        <li><a href="//area51.stackexchange.com" title="proposing new sites in the Stack Exchange network">Area 51</a></li>
                        <li><a href="//careers.stackoverflow.com">Stack Overflow Careers</a></li>
                    
                </ol>
            </td>
    </tr>
</table>
                </div>
            </div>

            <div id="copyright">
                site design / logo &#169; 2015 stack exchange inc; user contributions licensed under <a href="http://creativecommons.org/licenses/by-sa/3.0/" rel="license">cc by-sa 3.0</a>                   with <a href="http://blog.stackoverflow.com/2009/06/attribution-required/" rel="license">attribution required</a>
            </div>
            <div id="svnrev">
                rev 2015.1.27.2227
            </div>
            
        </div>
    </div>
    <noscript>
        <div id="noscript-warning">Stack Overflow works best with JavaScript enabled<img src="http://pixel.quantserve.com/pixel/p-c1rF4kxgLUzNc.gif" alt="" class="dno"></div>
    </noscript>
<script>var p = "http", d = "static"; if (document.location.protocol == "https:") { p += "s"; d = "engine"; } var z = document.createElement("script"); z.type = "text/javascript"; z.async = true; z.src = p + "://" + d + ".adzerk.net/ados.js"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(z, s);</script>
<script>
    var ados = ados || {};
    ados.run = ados.run || [];
    ados.run.push(function () { ados_setKeywords('java,decompiler');; ados_load(); });         
</script>

    <script>
        (function (i, s, o, g, r, a, m) {
            i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () { (i[r].q = i[r].q || []).push(arguments) }, i[r].l = 1 * new Date(); a = s.createElement(o),
            m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m);
        })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
        ga('create', 'UA-5620270-1');        
        
        ga('set', 'dimension2', '|java|decompiler|');         
        ga('send', 'pageview');
        var _qevents = _qevents || [],
            _comscore = _comscore || [];
        (function () {
            var ssl='https:'==document.location.protocol,
                s=document.getElementsByTagName('script')[0],
                qc=document.createElement('script');
            qc.async=true;
            qc.src=(ssl?'https://secure':'http://edge')+'.quantserve.com/quant.js';
            s.parentNode.insertBefore(qc, s);
            var sc=document.createElement('script');
            sc.async=true;
            sc.src=(ssl?'https://sb':'http://b') + '.scorecardresearch.com/beacon.js';
            s.parentNode.insertBefore(sc, s);
        })();
        _comscore.push({ c1: "2", c2: "17440561" });
        _qevents.push({ qacct: "p-c1rF4kxgLUzNc" });
    </script>        
    
    </body>
</html>